<?php

namespace App\Models\Goods;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class Goods extends Model
{
    //使用软删除
    use SoftDeletes;
    //表名
    protected $table = 'jxt_sys_goods';

    const CREATED_AT = 'create_at';
    const UPDATED_AT = null;

    public function getCreateAtAttribute()
    {
        return date('Y-m-d H:i:s', $this->attributes['create_at']);
    }

    public function fromDateTime($value){
        return strtotime(parent::fromDateTime($value));
    }

//    public function getDeletedAtAttribute()
//    {
//        return date('Y-m-d H:i:s', $this->attributes['deleted_at']);
//    }


}
